<link rel="stylesheet" href="{{ url_for('static',filename='layui/css/layui.css',t='1483944306685') }}" media="all">
<link rel="stylesheet" href="{{ url_for('static',filename='layui/css/admin.css',t='1314') }}" media="all">
<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list"
     style="padding: 20px 30px 0 0;">
    <div class="layui-form-item">
        <label class="layui-form-label">公司性质</label>
        <div class="layui-input-inline">
            <input type="text" name="gsxz_name" value="{{ gsxz_info.gsxz_name }}" lay-verify="required"
                   placeholder="请输入公司性质名称" autocomplete="off" class="layui-input">
        </div>
    </div>
    <input type="hidden" name="id" value="{{ gsxz_info.id }}">
    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button" lay-submit lay-filter="edit-gsxz-form-submit" value="确认" class="layui-btn">
        </div>
    </div>
</div>
<script src="/static/layui/layui.js?t=1483944306685" charset="utf-8" type="text/javascript"></script>
<script>
    layui.use(['jquery', 'layer', 'element', 'table', 'form'], function () {
        var $ = layui.jquery, i = layui.view,
            element = layui.element,
            layer = layui.layer, table = layui.table, form = layui.form;
        //监听提交
        form.on('submit(edit-gsxz-form-submit)', function (data) {
            $.ajax({
                url: '{{ url_for('admin_edit_gsxz',gsxz_id=gsxz_info.id) }}',
                data: data.field,
                type: 'post',
                dataType: 'json',
                success: function (returnData) {
                    if (returnData.status == 1) {
                        layer.msg('修改成功')
                    }
                    else {
                        layer.msg(returnData.info)
                    }
                }
            });
            return false;
        });
    });
</script>
